package com.estun.backroundManagementService.modules.process.model;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.estun.backroundManagementService.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_process_detail")
public class ProcessDetail extends BaseEntity {


    /**
     * 工艺名称
     */
    private String name;

    /**
     * 工艺名称
     */
    private String code;

    /**
     * 备注
     */
    private String remark;

    private String positionIds;

    @TableField(exist = false)
    private List<Integer> positionIdList;

    public void setPositionIds(String positionIds) {
        this.positionIdList = JSON.parseArray(positionIds, Integer.class);
        this.positionIds = positionIds;
    }

    public void setPositionIdList(List<Integer> positionIdList) {
        this.positionIds = JSON.toJSONString(positionIdList);
        this.positionIdList = positionIdList;
    }

}
